package com.schedule.task.service.impl;

import com.schedule.task.dao.BookUserMapper;
import com.schedule.task.entity.BookUser;
import com.schedule.task.service.BookUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

@Service
public class BookUserServiceImpl implements BookUserService {


    private final BookUserMapper bookUserMapper;

    @Autowired
    public BookUserServiceImpl(BookUserMapper bookUserMapper) {
        this.bookUserMapper = bookUserMapper;
    }

    @Override
    public void addMoneyScore(BigDecimal money, Integer uid) {
        this.bookUserMapper.addMoneyScore(money, uid);
    }

    @Override
    public List<BookUser> allUser() {
        return this.bookUserMapper.allUser();
    }

    @Override
    public void changeRank(Integer rank, Integer id) {
        this.bookUserMapper.changeRank(rank, id);
    }
}
